package com.itheima.test05;

import java.util.Scanner;

public class Test01 {//不死神兔递归写法
    public static void main(String[] args) {
        System.out.println("请输入想查看几月份的兔子个数");
        System.out.println(getMonth(new Scanner(System.in).nextInt()));
    }

    public static int getMonth(int month){
        if(month == 1 || month == 2){
            return 1;
        }else{
            return  getMonth(month-2)+getMonth(month-1);
        }
    }
}
